package com.audaque.springboot.foshanupload.web.mvgenerator.controller;


import com.audaque.springboot.foshanupload.web.mvgenerator.model.qo.GeneratorWhichVmQo;
import com.audaque.springboot.foshanupload.web.mvgenerator.service.MvGeneratorVmService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * BaseInfoNewController
 *
 * @author chinaben
 * @desc 人口基本属性
 * @date 2021-06-10 16:09:06
 */
@Tag(name = "代码生成器 管理")
@RestController
@Validated
@Slf4j
@RequestMapping("mvGenerator")
public class MvGeneratorVmController {

    @Autowired
    MvGeneratorVmService mvGeneratorVmService;

    @Operation(summary = "执行生成")
    @PostMapping(value = "doStart")
    public String doStart(@Validated  @Parameter(description ="请求体", required = true) @RequestBody GeneratorWhichVmQo generatorWhichVmQo) throws Exception {
        mvGeneratorVmService.doStart(generatorWhichVmQo);
        return "success";
    }


}

